#ifdef a
#pragma once
//堆 的
#pragma once
#include<stdio.h>
#include<assert.h>
#include<stdlib.h>
#include<string.h>

typedef int HTYPE;
//函数类型声明

typedef struct Heap {
    HTYPE* harray;
    int size;
    int capacity;
}Heap;
extern int HeapSize(Heap* hp);//堆的有效元素
extern int HeapEmpty(Heap* hp);//判断是否为空
extern void HeapDestory(Heap* hp);//堆的销毁
extern int HeapManyCapacity(Heap* hp);//容量大小
extern void HeapInit(Heap* hp, HTYPE* array, int size);//堆的初始化
extern void HeapPush(Heap* hp, HTYPE data);//堆的插入
extern void HeapErase(Heap* hp);//堆的删除
extern HTYPE HeapTop(Heap* hp);//获取堆顶元素
extern void AdjustDown(Heap* hp, HTYPE parent);//向下调整
extern void AdjustUp(Heap* hp, HTYPE child);//向下调整
extern void Swap(HTYPE* x, HTYPE* y);//交换
extern void CheckCapacity(Heap* hp);//扩容
extern void TestHeap();//测试
#endif 